package anji.plus.system.mark.domain;

import anji.plus.system.mark.base.BaseDomain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 系统用户表
 * </p>
 *
 * @author luwei
 * @since 2023-11-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class AccountRecord extends BaseDomain {

    private static final long serialVersionUID = 1L;


    /**
     * 账目收支类型：收入或支出（收入0，支出1）
     */
    @TableField("RECORD_TYPE")
    private String recordType;

    /**
     * 账目描述
     */
    @TableField("RECORD_DESCRIBE")
    private String recordDescribe;

    /**
     * 账目金额
     */
    @TableField("RECORD_AMOUNT")
    private Double recordAmount;

    /**
     * 创建时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("CREATE_TIME")
    private LocalDateTime createTime;

    /**
     * 操作人
     */
    @TableField("OPERATOR")
    private String operator;

    /**
     * 账目使用分类，默认0，
     */
    @TableField("RECORD_USE_TYPE")
    private String recordUseType;

}
